package com.whjfxx.terminal.controller;

import com.whjfxx.terminal.biz.service.CaptchaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created by b.c on 2022/6/23 14:49
 */
@RequestMapping("captcha")
@RestController
public class CaptchaController {

    @Autowired
    CaptchaService captchaService;

    @GetMapping("captcha")
    public void captcha(HttpServletRequest request, HttpServletResponse response) throws IOException {
        captchaService.captcha(request, response);
    }

    @GetMapping("spec")
    public void spec(HttpServletRequest request, HttpServletResponse response) throws IOException {
        captchaService.spec(request, response);
    }

    @GetMapping("gif")
    public void gif(HttpServletRequest request, HttpServletResponse response) throws IOException {
        captchaService.gif(request, response);
    }

    @GetMapping("chinese")
    public void chinese(HttpServletRequest request, HttpServletResponse response) throws IOException {
        captchaService.chinese(request, response);
    }

    @GetMapping("arithmetic")
    public void arithmetic(HttpServletRequest request, HttpServletResponse response) throws IOException {
        captchaService.arithmetic(request, response);
    }

}
